Fix NPE, proper strings and cleanup

Change-Id: I3590eabc32bf0896a87b8524980c14d5d818b76f