Trap: Refactor handling of scan
Kill debug output