Added a function to slice the rest of the ancient code to fit it into the window game.