Fix cleanup, implement minor fixes

Change-Id: Ie3bc1655ec1007d8837245d715180e343b997c64