Add random number generator & refactor view to use one.