Refactor dates, hook up to search