Refactor the whole structure.