Finalized threading. Tested for functionality.

Need to implement logging (as a bonus)
Need to implement advanced caching (as a bonus)