Refactored out methods for all of the conditions.
Refactored to use polymorphic dispatch.