Refactoring pseudorandom classes