Working on query attributes

Got the clear function working for attributes, started on remove but
stopped to work on more mission critical.