Reorganized and split classes into individual files.