Bug fixes and method additions