Cleanup of the datetime methods. Still a bit to do with scheduling