aaf refactoring