Calculator using revealing module pattern in javascript