First shot at the specification. Closes #2.