Adding main() function to ensure everything is enclosed in a function