Libraries created. Sorting methods unified. Similar constants unified. Major refactoring. Memory leaks fixed.