Added filtering logic. Marked changed locs. Added apply and cancel buttons.