Did some refactoring and started to add Flask components to allow an image to be inserted