Fixed pep8 and added documentation