Refactored to return class information separately from the dependencies themselves.