Assorted cleanups to macro implementations and project structure