Added more code for dependency support.