Role implementation

Development branch was refactored into the role model.