Small refactorings to make jenkins happier #1