removes uneeded classes