Fix ply generated files again. Various small fixes.