Added doxygen documentation and added missing header.
Fixed MsgQueue memory deallocation.
Minor change to appease compiler.