Cleaned up filter message logic