Code cleanup to take RSM to a releasable state.