Refactor RandomValueGenerator