Generic interface for the main()