Rolled up the Semiring and Heap parts into one trait