Added macros support to tools