Add support for optional requirements
Add provider preference by version
Add provider preference already wired
Fix optional resource resolution