Fixed invalid subroutine calls and undefined message types

Removed undefined MessageFactory type CustomValueReply; Fixed invalud su...