Added some controller functionality
Minor changes to persistance. Test works for retrieving images.