promised sub/pub & better event viewer & some cleanup and improvements