update aliroot version for grid; reorder the beginning of main function; using ::Class() for InheritsFrom