toolkit refactoring