found build_deps bug and fixed it, and many small changes.