Due to limited ESP32 WROOM ram, the code hangs. Cropped some sub-methods and variables to make it simple.