Restructuration code (separation_toolkit.js)