Reorganize into class