[#692] Code clean up

* Removes unused imports, variables
* Formats some `if` expressions
Merge pull request #693 from akvo/issue/692

[#692] Code clean up