Ported additional snips from previous plug-in.