Submission into DB complete.  Working on calc function and adjusting variable scope.