Fixed a serious bug in random polynomial generation. Made RNG overridable.