Seperate MainProcess class from main method