Filter working
More cleanup required, but works for now.