First version of RDF refactoring support.

Change-Id: Ic12adabe75a77ced76b181bcc4d032a67472bef5