Added a main method to ApplicationMaster.