Neaten up main()