Added a bunch more comments, plus some serialization options to try and make it so that I don't have to calculate the library every time.