Major class reorganization

Reorganized classes into names and packages that make sense.