WIP: Moving functions to be entity members when appropriate

Renaming them in the process.