(change:major) Refactored sniffer code.