Improved tests and caching process