Main Class rework