Various cleanups and fixed by Marc and Ralf to start the OpenTLS project