Added some image logic