Simplify the smiley filter function