[TASK] minor changes and some bug fixes

lots of code cleanup, some typos fixed

Change-Id: Ib31737b21950ca3253e388b32181f2391ca421b2
Reviewed-on: http://review.typo3.org/34225
Reviewed-by: Simon Schaufelberger <simonschaufi@googlemail.com>
Tested-by: Simon Schaufelberger <simonschaufi@googlemail.com>