Refactored previously aggregating scripts