DateTime refactoring and fixes. It seems to fully work.