Merged photo deletion code. 

Filter breaks out of memory error, after integration