Fixed a bunch of little things to make it work in Firefox as well as Chrome and Safari.