restructured most of the classes