Changed field offsets from magic numbers to named constants.
Changed plain integer fields to tagged integers for simplicity.