Refactor setup script a bit