Restructured all my code to be more modular and simpler