refactoring;
clean up;
added message-view directive;