Move primitives to own crate