Refactor after sample changes