Refactor Time and Date classes.