move certificate classes to their own namespace
Cleanup certificate code