1500 lines left - still trying to reach the goal of abstracting the main app logic to less than 500 lines