Make sure to break in case statements, and refactor for better image upload