Remove dependency on images
Optimizations