Added use of get_coord_dict and cleaned up more coord stuff.