Fix typo: Pepare -> Prepare
Use flake8 on the file
Merge pull request #1 from matrixise/master

small fixes and flake8 compliant