Merge v1.4.0

Changes:

- minor internal optimizations.
- update script headers (date, description).
- cs fixes.
- minified version with Closure compiler.