Reduce minified size by caching document, Math, & undefined

Closure to cache document, Math, undefined -- should result in a very slight performance improvement and smaller minified size.