profiles edit refactor