Small script improvements