refactored. Added util class for dispatching the requested tool.