Rm refactor