Move JS and CSS to external files
Better handle focus
Format JS and move UI code out of closure