Moved primitives into a separate module