AM refactorings
Cleanups