Added two global actions and cleaned up a file.
Moved two functions around in a file for clarification.