Fifth commit

1. R2, the variable which stores the information of MSD has been
modified.
2. Arrays s[] and ave[] where removed.
3. The function ran1 has been moved to the end of the file.