Cleaning up some dictionary usage