Refactoring profiles commands