Merge "More correct startup and shutdown procedures." am: 618d4215a2 am: b6588f9a41
am: 7074b562d9

Change-Id: I8c1e0b235808635a910262a65530e655408cc5d8