InputPosition now stores start and end positions