fixed returning from recv
fixed merging classes. Dispatch not working.
removed unused code