cleaned some things up and tried to add some javascript