Keep main file clean and fix bugs