The code in the GUI needs to be broken down into separate functions and files to organize the code and make it easier to understand.