This func is HUGE. Any way to cut it up into smaller and easier to read pieces?