Cleaned up stable heap code.