Basic threading framework implemented.

* Error-handling
* Threads
* Added copyright