Improved examples

Improved the code that creates the server,client and CA certificates by adding comments and variables.

Note:This is my first pull request using github. So I apologize if I have done anything incorrectly.