added macro simplification via globalization of independent expressions