handling more integration issues now
handles if there are classes named Total in the output
cleaned up error handling