Added some updated files for the library from the thesis repo. These are not very efficient, but they are correct, which is the point. :-)