Merge pull request #7 from mrda/randomness-refactoring

Adding tests for randomise