Refactor and refine some tests and partials