Merged main.py functions into one and adjusted calling from controller. Updated Flat UI.