Refactor #5 - Remove Duplicated Code

By adding the CMsgHandler class the existence of duplicated code in the
message handling procedure became apparent.  This is the last
refactoring I'm doing.