cleaned up gems
rules engine enhancements