Improved way of loading images