3.1 compatibility fix.
Display mode optimization.
RoleInterface renamed to RoleObjectContract, and a better way to define them.