oops, segfaulting fixed

forgot to empty the buffers every time
also needed more memory
changing to static arrays inside Book
fix some illegal memory accesses that may occure

-remove some debugging content
-rearrange some stuff