Put in most of dependency logic

Signed-off-by: Cory Feitelson <cfeitelson@roovy.com>