Am refactoring