Updated creation of dates for response, some code cleanup