Some more efficiency improvements