refactor put ViewMessage handler in separate module