Made a PictureController and cleaned up a little bit of code