Fixing test setup and adding some API to components