Reduce dependencies, fix broken script