Sort and delete photos