Code refactored, somewhat cleaner.