Created simple config. Set up db connection and image model. Moved upload code into view file