Fix indentation and some coding style issues

This is a request to fix the indentation and some minor coding style issues.

While looking at the code my eyes start do hurt ;). So i cleaned up the TAB/spaces horror and use a indentation of 2 spaces now.