Adds certs API stubs. Fixes for PSR-2. Adds Exceptions namespace. Rename types namespace.