Unit tests, UI class, cleaned main