fixed bug
added "deletePhoto()" method
added "beforeDelete()" method. It deletes the photo