Used two dictionaries to keep encoded values seperate from decoded values.