Added a reset function, changed start/stop logic to make more sense between restart and reset. Also added unit tests