Refactoring towards registered attribute gem