Initial and completed version.
Merge https://github.com/felgari/PhotMass