Making HTML5 calculator