Refactored installation scripts