Fixed mix of tab and spaces, and code cleanup

more love