Efficiency improvements

shape