Fixing date errors and pep8 warning