#29 tls.hs: tribial refactoring