Optimize collections code
Optimize views code