Use lang.AM and lang.PM

Fixes #331
Merge pull request #332 from brandonkelly/master

Use lang.AM and lang.PM