Renamed to ATrieMap and added a set typedef
Slight refactoring, generalizing function