Implemented a bit of code for multithreading. It is not functionally useful for our purposes, but it is sort of a template for how to do it.