Fix up some dependencies, build and init stuff.