Refactored install scripts