Some updates to the main method