Pep8 and refactory

* Solve some pep8 problems
* Remove an unused file
* A few refactory and change to use new-style classes