Cleanup + parse certificate

More cleanup
Add intial parse certificate and validate function

Jira Issue: WP-123