Improvements to macro_atom and other things