Several crittical bugfixes and improvements

I used REM-unit-polyfill in our project and found several critical bugs. 

Also I fixed original font size calculation (see comment to commit) - I think that there is no other possibility than change body font size for calculation and restoring after it (at least I didn't find). But without this rem calculates wrong.

Notice: I tried to change minified version - but by unknown reason Google's Closure Compiler generates incorrect code for "simple optimization" setting. I reverted code to non-optimized version (only minified). Please, update this version by yourself. Thanks