Use model class in calculation.js, Bug #2307