Implement expansion of expressions