Optimization and modernization. Added ability to load images directly from web