Added dependence functionality and associated tests