Began reorganizing code