Start working on stack. Reworking circular relations handling