Fixed trim function to actually work

I have no idea why it was $_ instead of shift, but it should work now.