BookManager: Add with statement support and bdase functions.