added pathway to images model, fixed controller bugs

fixed controller bugs, added pathways to images model.