Refactored the roletask and usertask, using the same code style as in the tanenttask