introduce requirejs modules - closes #1