fix trail emit spawn position.  code cleanup