Changed the SCHEMA_VERSION back to 310.
Updated unit test for new 'endtime' change. Fixed code to conform to pep8.