add ssl support and remove a bunch of things that are not needed.