Cleaned up caching and recycling logic a bit