Refactor how methods are transformed.