Upgrade and fix warnings