Add some AMMS classes

The first commit in this branch is from #595, so #595 should be merged first.