Whitespace changes

Changed tabs to spaces and corrected some minor code style issues.