pep8, extra parameters, validation

Would be nice if you could merge this into master. Let me know if you have any questions.