Added reset/randomize functions.