Added more documentation from original source. Fixed RefEntity's missing properties.