recycling heaps + micro optimalisations