Added factories and moved default certificate to CertFactory

Need to write some tests

Issue #27