Refactor to remove openssl dependency.  Increase test coverage and simplify the test layout