remove constants and use tls-constants