Various small changes and fixes

Change-Id: Ic28ded36203398e06c3577cb89233978396b4aeb