Implement whitelist for collection functions

Fixes #33.