Clean up some code
...
Merge work in
Merge branch 'statefilter'