Added preserve partition option, documented code.