Moved scoping and lambda processing back into re