Added a simple (and incomplete) dependency management logic