Define a macro for free groups, add missing relations in amalgamation of groups