Reorganizing the code.