fix base uri generation, add test for r object builder