Fixed all bugs in Library.cpp and menu.cpp