cleanup templates
add key revocation