Various speed improvements.