Fix #27 and remove dateutil dependency