Changed some of the base rf functions, and changed test code