More code improvements, fixing DateTime