PermanentMap: Simplify and include basic tests.