Couple of code changes

First commit is a general code cleanup.

Second commit is streamlining the javascript.

Third commit is switching the css from position absolute to relative stuff.

Feel free to cherry pick some (or none!). :)