refactor, add messages to profile, tests