Cleanup of 4PS code.