Added image loading code