Rewrite of pwiz (!!!)