Moved code into a main() function