Macros and main data structure