Added possibility to add an element to an attribute that has a list as a value.
Added more test cases