rsCommon

This is a first pass on abstracting some functions from rsBasePrep to rsCommon.