Fixed a few more bugs and tried unsuccessfully to make calendar work.