Rename buttons to 'Scan'/'Cancel'

clean up the logic a little bit and remove the reinterpret cast as well.