Further changes to calendar code