Documenting and fixing RMM code to fit new structure