Slight 'refactoring' for the sake of code style consistency.
Refactoring to pass tests.
Cleaned up tests.