Refactor into partials