Small efficiency improvements