Updated functionality on PicturesController.cs