Starting to abstract and extract tool functionality.

Please Continue doing so.