This code has backward compatibility. I added BOM cut off (if it exists) and move all the three lines (configuration processing) to a new method to avoid code duplications. ServiceManagement tests passes.