Removed an unnecessary variable from trim() function