Fix structure of main class