Book formatter rewriten