Fix a Strict standards warning

My errors rates went crazy due to a bad variable reference which cause a `Strict standards: Only variables should be passed by reference`
Fixed by using a temp variable `$ctrl`

 + Minor QA and whitespaces cleaning...