Added Expander module to handle matrix expansion.