Fixed RS namespace and Fixed the tests.

This is mostly a dupliate of the existing pull request, except that the Unit tests are now green.