Add pre-study fixes from prestudy repo, and fix a bunch of spelling errors