Refactored to move specific gem behavior out of the module