Update widescantool.lua

Clean up and fixes