misc improvements to book generator (works in FF)