Modular JavaScript Calculator