Remove useless code, improve OOP.