Make a few commenting changse in the sub-files. I modified femsim.f90 a fair amount because it did not seem to be up to date with the current rmc version. Femsim.f90 is another program that just runs the femsim part of it. RMC runs femsim millions of times. So I am going to work on femsim.f90 first.
I should have pushed a while ago. I am working on getting femsim.f90 and it's needed code cleaned up.

I have created 3 new files with the endings _v2. These new files are stripped down and cleaned up versions of the old ones. Femsim only relies on model, read_inputs, fem1, globals, and scattering_factors. I left the last two alone since there is no reason to change them. The other 3 have the _v2 endings.

Right now the code compiles and runs, but I had to set a variable to 0 because it was segfaulting constantly due to this variable (pp). Search fem1_v2.f90 for DELETE THIS LINE to find the offending line. I need to fix this correctly, instead of just setting it to 0. I also had to add a line to fix a similar problem somewhere else. Search for write(*,*) "     j = ",j. This line should correctly fix the j problem, but I need to make sure.

I still need to (more) thoroughly go through the code. There are some things I want to do. Search for TODO to find most of them.
Hopefully my previous commit will work. I edited a few things while I was thinking about them as I wrote the previous commit message. Now I am commiting those minor changes.