Fixed some date related things
Added exception classes