Data science up for first round of review

1) Focus on rspec tests 
2) Stuck at trying to refactor the exception part
get_success and get_total, seem to be called quite a bit. refactor this so that :success :total is set in one shot, based on the group(struct/class) that is passed into a function