Don't allow writing 0 elevation pixels, misc cleanup