Cleaned up whitespace in library source files

Converted tabs to spaces
Normalised indenting to 4 spaces

I used this tool to help me:
http://astyle.sourceforge.net

And then verified the results manually.