Added validation and role saving