Fixed IE8 Issue

Fixed an issue with IE8 not working
Cleaned up some extra variables, functions, and dependencies.