Refactored install scripts to make Jenkins install stable