Code cleanup, add tests for cummerbund_to_tabular