Stripping averaging code for a simpler and faster tripwire