Code Issues: Optimize access to dictionary