Implemented cycle detection + removed old absolete code