Issue #24: Refactor of AE-scheme to clean up logic