Added debugging options, added nodeid mapping