further main() formatting and comments added