Bug fixes and ressearch