Wrap the standard dictionaries in an "aps" namespace.

This resolves a regression caused by the last commit.
Add support for custom dictionaries.