Reuse scan settings
Fix compiler warnings, cut redundancy