Refactor out all duplicate tables