Code cleanup

Changes:
- Added proper function for dispatching data to runloop
- Uninitialized ports now initialized to MACH_PORT_NULL instead of 0
- Removed unused test code