Refactor schema tools