Added serialization functions
hlint: testing style of tests as well
test/TestRandomGen: added actual statistical tests