Adding SSL support + cleaning up tests to be production-friendly