Fixes and cleanups

Change-Id: I5bb11a05aaf436c2a305f9b29caba60517264e26