Unit tests. UI fixes