internal: add common structures and macros