Add internals doc, also rename some fields.