Write files after mixed-layer removal
Some other minor changes