fixes and cleanups

Change-Id: I025c980cf50d3ab2501c8c1519ead667c41b0ec6