fixed some code violations

* made RandomGenerator final as it has no public constructors