Fixed cache bug, greatly simplified caching.