Simplify numbers of macros and extend their functionality