Merged from Content RS, and updated for v 7.x.