Finish reference scheme refactoring

Change-Id: If0936ccb3af247b89493d6bf3d6f149613cede95