Refactor the code into separate files. one file one class, do one thing