Renamed PTPLibrary to PTPFramework, algorithm overhaul