Reorganize primitives