Cleaning controllers

yet another cleaning PR, controllers this time..
- removed lots of unused globals
- some minor fixes like missing globals, typos in var names etc.
- several todo remarks. I'd expect bugs there, so please check..