Improved dependency check
Tests are pretty great now