fix tests
add whitelist mode + fixes and tests
Merge pull request #2 from dimagi/whitelist

add whitelist mode + fixes and tests