Added suffix array implementation. Some renaming in graphs.