Another random function. Can never have enough.
Clean up overloaded variables.