Added support for cyclic dependencies. Updated README.