Updated Main.java with new comments