Added Filter class and fixed some stuff with deleting