Cleaned up javascript a little
Change main page to php script file