Changed constant names.
Organizing code.
Adding filter updating by query.