Cleanup code

Remove impossible logic
Remove dependencies on PacketAnalyser where possible
Remove multiple if(false) blocks.