Added 'depend' clause and some small changes