Started implementing a heap (max-heap). Still not 100% and performance can be improved.