Main Class and some fix