clean up home page code