Fixed any bugs with the new reset function and included in the setup for the unit tests.