Cleaning up page code