cleanup home page code