Move code out of header file
diary updates