Some more ugly script rework.