Fixed typos, broke out inline javascript into main.js. Left-ruled javascript, formatting to be done next.