Unit testing: Improving coverage

* Refactor the code to separate the controller (which will make it
easier to test)
* Increasing coverage of `frontImageApp`