Added function to map message and error codes to strings