Fixed date calculations + lots of cleaning.