Fix horrendous bugs in trim function
Invert coords in input name