moved most main processes to a separate MaizeRunner class