JSDoc'd everything
mask.fromPBMUrl was embarassingly bad.
s/mask/m in some parts; apparently caused errors in some cases.