Refactor profiles spec