cleaned up code. totally spartan. refactored and extracted javascript out of the html and into separate files