wip: refactoring tools
wip: huge rewrite