Creating a top-level main() function