pep8 fix and clean up of persistence method