Added conection to database and retrieval of images