Bug fixes and extensions to topic analysis