Moved transmitPackets() to misc.

Because it seems very generic / reusable.
Refactored out tap into separate file.
doTap() no longer tied to requesthandler.