A framework for writing truly modular JavaScript with separation of procedures