Started page control and cleaned up code.