Profile page. Tests and refactoring.