api: books and users, cleaning up and writing tests