Still a mess but adding changes to fetch upstream.