Add reset API endpoint
Fix tests