Sketch out better dependency solver for sandbox

WIP! Note that this commit breaks the build. Use previous for testing.