Adding singleton template.
Making RandomGenerator as a singleton.
Testing code.