Minor refactoring and documentation in profiling RTS code