Cleanup backtrace code