Refactored into a 'rules' package.
Tests created to validate rule firing