Cleaned up filter text animation function