Fixed bestPEST and now it works, even in UNITY! Until we find the bugs...

Also, patched up some stuff, small refactorings