Added prototype parsing function for references