fixed formatting of certain dates, cleanup, optimization, code golf