cleaned up the front page code