Huge code clean in main class