Add flat items by p|x, cleanups.