Updated preferences doc to .md style; made some typo and code corrections