small fixes and switch to joda time