removed unused methods from connection
pep8 fixes
more pep8