Fix tab vs space issues in code

Changed all tabs to be spaces to avoid problems between editors.
Merge pull request #2212 from Dr15Jones/fixSpacingIssues

Misc fixes -- Fix tab vs space issues in code