Refactor the backtrace cleaner for greater clarity

Signed-off-by: Sam Phippen <samphippen@googlemail.com>