I'm a little concerned with how long this function is – it's well over a hundred lines. Can you look at ways to possibly break it down?