Lines from 117 to 123 in addProperty are simillar maybe we can extract that stuff to some private method?