Fixed weak-ref error, adjusted line length in a few files to follow pep8, more to come