Some tidy up, image upload currently broken