Adding classes, fixing bugs