Added more tests around attributes over text content, fixed bug where attribute is set and empty, and fixed bug where defining settings overwrites defaults for subsequent calls