OOP + some fixes