Adding full source code of the tool.