trim local functions properly
changed from trimming to verifying. That thing I did in the past was silly