Move common trim funcs to separate file
Trim to polygon seems to work but slow
Prep poly to increase performance
Fix string encoding