Start of calendar code and refactor of tests