Refactor actions queue