Refactor/testing