first style fixes - @samtuke: I added some TODO regarding undefined vari...

...ables and unreachable code - please review