Improved extract depends, added some backward compatibility