Added allow/deny stuff and tests.