Simplify and make more deterministic algorithm for dependency pulling. #100
New algorithm for dependency resolution, tests. #100 #81