Changing filter to on key press

Also added changes to remove state