Various fixes

* Tests are passing
* Code is prettier