Speed up

by split procedures for initialization and animation loop
Export objects when used with RequireJS
Add demo page for using script element loading