Reworked filter form and removed some unused code.