Added inverse sorting, and inheritance analysis