Finish moving everything out of global scope.