add helperfunctions for responses, send 404 if image is not stored in db
require knox for helpers
code cleanup
refactor with helper functions"