Cleaned up code and added write unit test
Refactored to use Theories for invalid input testing on all concrete tests