fix date filter and clean up the class a bit