Refactored index representation from coded int to Position object.