fix issue with pr calc, cleanups, remove cruft