Corrections and cleanup for macros; Handling for empty assemblies