Add primitives for push, pop and merge.