Refactoring mruby-rand