small change for memory purposes
Update for photon flux management, pointers used
bug fix for M_diff