Merged foo() and main() such that main() now examplifies coding style