Main updated to use macros