Simplified reference getting
Move unreferencing, so we are sure one of the values is kept
Add missing getref()
Add refcounting to ws_action_manager_init()
Add note that function should be called with aquired ref on argument