Add defaultState and createRandomState (#61)