Refactor the design