Little fixes and new tests