Added pseudo random number generator (KISS)
Changed CMakeLists.txt to regard the prng
Code refactoring