deleted unused funcs
Fixed attribute names in queries.