Switched from tabs to spaces.
Minor code refactoring.