Minor speed improvements