Cleaned up formatting
Refactored js out of html page