Refactor how partials are handled.