Last minute code cleanup and fixed bugs in IE8 and iPad