Templated set_target_position and fixed type.

Now that templates work, this makes more sense.  Refactoring!