Added some dependency handling