Indentation

Fixes indentation of local variables
Adds a new QA test

Adds a new test to try to cover some of the balancing functions that are currently not being executed in the test bench. Hopefully it'll be enough.