Modular framework for javascript