Clean up some imports and shorten the reverseScan check logic