Refactor out coordinates into a named tuple