Add tests for cli/tools. Also fix typos and remove unnecessary files