Minor efficiency improvements