get rid of unneeded attributes, add encoding and url to reader