Add jslint validation
deleted unnecessary code
Throw exceptions on error
calendar.js