Switching to a dictionary

Not fully done