Added filtering scope as usable trait.
Fixed small error in checking existent attributes.
Reworked and tweaked some code
Updated stubs to work with the reworked code.