more cleanup

Signed-off-by: Sven Strickroth <email@cs-ware.de>
hacked tls
make plain, tls and ssl work
Do some cleanup