Began restructuring the code.