Generic mktemp and some stylistic changes in documentation