Improve testing
Refactor