Update readmodel.py to use resolve_model function, and remove duplicated...

... code.