More IE8 bug fixes and code clean up.