Random clean and some additional testing.

Fixed an issue around filters as well.