General caching and speed improvements.