Move the class definitions out of the filter?