Refactors balloon controller to make it more testable

Adds unit tests for the balloon controller.