Moved primitives into their own unit.

This updates and closes #2.