Entity pointer fixes, and structure changes.