RMG cleanup and commenting