refactored some of the testing framework to be more flexible -- especially regarding permissions.