[Close #28] Finish scan function.