Cleaner heap implementation.