Use more RAII in initialisation code