More OOP and 2d/3d reworking