more main() cleanups