added some refs; changes to macros