Added new printMessage function and some message codes