config to control uploads, some minor reorganization