some clean up, compile fixes...

 this can be imported in python
but the packet_sink still needs porting to new api