some tool refactoring to make it easier for tools to draw