Removing unnecessary code, restructuring