Removed duplicate code. Cleaned up white space issues.