Adding lots of roles and some reorganization of code