More cleanup for the spec. Ported over @som-snytt's PRs.