Beginning refactoring in preparation for provisioning application specific permissions.