refactoring the oil library initialization