changes on how databases are handled, also now passes pep8.