added a little more calendar functionality and reorganized js file