refactoring: moved to RequireJS modular architecture
fixes #10