Initial UT and fixes