pylint'ing and pyflaks'ing sources. Add some docstrings and pep8'fying code