Add tests, refactor partials, add counter