Splited Main and Main-Loop files