Add Hammerhead optimizations