removed reduntant classes, fixed some bugs