Removed unused types. Reorganized data definitions.