performance tweaks and ssl support