Re-organized for easier model definition.