Added extends functionality to beget.