Refactor scaffold.