#1: Clean up filter implementation