Started working on cyclic dependency detection

Change-Id: If80feece5ab236a5d2b2f8b3447d59e284d17b03