Could you help me Compact my Code"