Major slimdown of the main()