Refactored currators/users, roles and permissions. Added new functions
for lookups.