Converted all actions to functions

In case I decide to call them from other addons in the future.