Restructured for OOP