Cleanup tests and make them pass

* All tests now pass
* Use mock
* Remove useless logging
* Misc pylint stuff