#44 refactoring tls.hs: separate before and after bind