Moving things out of the monstrosity function, making things more logical.

Cleanin' it all up before the final sprint.