Pulled in core functionality from PPS after asynchronous rewrite.