Small fixes and add test setup.