Centered Webpage and cleaned up code so there are less global variables