Implemented AP. Closes #9