Improve CodeMap type and start implementing the tix lookup function