Implemented basic reference resolve for data and newtype constructors.