Merge "Make use of keystore and keymaster names consistent. Also fix bugs."