moved randomly-scattered primitives to primitives.scm and grouped them by protocol