Delete context and refactor interpPoint to a single function