Refactoring with Adam