Eliminated type conversion warning by putting in an explicit type conversion. I also commented out the lines where the unused filename strings are declared to eliminate those warning.
Deleted rng testing code.
Added errorflag and a counter to keep track of the length of directed loops so we can quit when they are too long.
All error checks in loop update now trigger error flag to be true.
Error checking probability.