clean a code and restore and old one to delete images NOT using ajax