image deletion, refactoring with partials