I assume you meant "difficulty += .001 * (600 - block.genTimeInSeconds)" instead?
Yes.
Second, I don't understand where the ".001" constant comes from. I'm not convinced that your algorithm would accurately reflect the difficulty of the hash generation.. it looks like it would converge into it eventually, but I'm not sure how quickly it would do that.
randomFractionFactor=.001. This isn't .001 necessarily, but just a factor to scale the change to a certain percentage of current difficulty.