Refactor design