Refactor according to latest kms-interface

Change-Id: Ia3d421bdbf7150d748c41dcc0c50b35f8222b987