Moving batch file to main class