Improved scripts structure