In progress refactor of filter compiler