Minor changes to main method