upgrade tools
reformat code and use tools namespace for text