Lots of JS fixes, merged ajax and master, fixed issues and styles with IE and Firefox, code hardening