Enhance assembly and variable expansion code