Refactor 2i AAE code -> FSM

And other changes to address review comments by Joe