CSS to independent file
Removed unused code
Separating out the JS functions
HTML Formatting
Variable scope change