Moved some commonly used idioms to NRPrefix.h and build guards to be able to include it in a variety of ways.