Refactor of sample keys and certificates