Added support for optional package references