Table sum bug fix

Fixes a bug in summarize_common_categories so that categories which match common_cats once stripped are combined, rather than over-writing each other.

The "other" category is also now calculated as 1 - sum(common_cats) so the figure will come out to 1.

Updated debug so it passes as a bool rather than a string.