Use constants where possible.

Remove duplicated primary key reflection. Primary keys are now reflected
separately.