Added Main.main, including argument handling and format conversion