Re-structure the code.