GH81: Implement helper for custom messages

Also changed error reporting for profile controller.
GH81: Implement helper for custom messages.

Fixed comments after review.
Merge pull request #94 from 35aa/GH81

GH81: Implement helper for custom messages