Refactored and cleaned up solution 1.
Refactored and cleaned up solution 2.
Refactored solution and simplified testing.