Main V2

Final version of the main