DRY-it up
Move cert/key logic to method
Cleanup

* Clean up method names
* Tighten up code