Splitting classes, fixing logic