#44 refactoring tls.hs: tribial refactoring