Updated code in main() to help with parsing improvements.