Add tests for resets
Refactor resets