Add thread filteres, and general improvements.