extract-methods function

Extract or replace parts of an object