Changed types of message and code to primitives

Change-Id: I79387af62ac09168d110067fa5babd971e552470