refactored scripts repo