removed Modernizr dependency, cleaned up code