Cleanup, fixes and additional stuff.

Eliminated unnecessary code, added functionality (role and roles select
lists, etc).