Refactored scripts.