#42 some refactoring of tlssv.hs