Cleanup of RCM codebase