better structure for javascript, automatic module loading dropped due to caching considerations