Refactor BibliotecaApp and test code