Replace subtotals metatable with simpler solution