Added two refactorings -- one primitive, one composite.

Primitive: doesn't work well, as its template is too loosely defined.
Composite: doesn't work because I've not yet worked out how to do them.