Rearrange and update definitions.