better OOP and documentation