move MMM calculations to Angular services

nice use of lodash!