move config to separate file, move scan init to scan.go