optimizations and fragments caching