Refactor profile pages