Added a few nice ideas from a friend
Reformatted code, and minor tweaks in js and css