Added support for nested optional variables