modRana adaptation
Refactoring
Rename message handler parameter

Replace the ambiguous type with messageType.
Refactoring & cleanup
General refactoring