Improved date handling, not finished however