Messages and comment validation refactored