#29 refactoring tls.hs: remove functions