Bug fixes and unit tests.
Updates.