Core code for Profiles RNS