Reworked organization of classes