Added roles and abilities, taken department_id into use. Rewritten comments and identifiers