Formatting/indentation overhaul

Hope you like the way things are formatted. This removes all tabs and has 4 space indentation. I, more or less, followed the general style of your formatting. But it should also conform to most coding standards, and I hope it's as clear and readable as possible. Obviously, feel free to adjust to taste, or redo parts you don't like, or whatever. :)

And this will get any whitespace related merge conflicts out of the way, for the future. There are no actual logic changes at all.