split github imports
move stuff around for better code grouping
inject HttpClient, remove globals