Small fixes, removal of redundant JS, comments added.