refactor scripts into separate scripts directory