Separate min and max heaps

Needs tests