added a None condition to Julia's max_projection function (I think she was working on a fix in parallel, so her solution can supplant mine); added contains_pn feature