Implement Ref model parsing