Code Refactoring in active_support