Refactored some controller logic into commands.

Added features with examples for inviting new and existing users with various roles.