Implemented filters dialog. Cleaned out some code