Rewritten to improve the code

Code interfacing the chess engine and chess clock are better separated now. API
has been simplified. The event names are camel cased for better readability.
Code is documented.